<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        // function arr(){
        //     var sum = new Date();
        //     var year = sum.getFullYear();
        //     var mouth = sum.getMouth();
        //     var day = sum.getDate();
        //     var hour = sum.getHours();
        //     var minute = sum.getMinute();
        //     var second = sum.getSeconds();
        //     var time = year + "年" + mouth + "月" + day + "日" + hour+ "时" + minute+ "分" + second + "秒"
        //     document.title = str;
        // }
        //  var sum = setInterval(arr,1000);
        //  document.write(sum);

        //  var time = new Date();

        // var weekday = ["星期天","星期一","星期二","星期三","星期四","星期五","星期六",];
        // document.write(time.getFullYear()+"年"+(time.getMonth()+1)+"月"+time.getDate()+"日"+weekday[time.getDay()]);
        
  function clock(){
    alert("你好大漂亮")
  }
  var a = setInterval(clock,4000)
        </script>
        </head>
        <body>
            <form>
<input type="button" onclick="clearInterval(a)" id="clock" size="50"  />
</form>
</body>
</html>